<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/datapicker/bootstrap-datetimepicker.min.css}" rel="stylesheet"/>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-account-edit" th:object="${account}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			
			<div class="form-group">	
				<label class="col-sm-3 control-label">账号：</label>
				<div class="col-sm-8">
					<input id="userName" name="userName" th:field="*{userName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">手机号：</label>
				<div class="col-sm-8">
					<input id="mobile" name="mobile"  th:field="*{mobile}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">注册邮箱：</label>
				<div class="col-sm-8">
					<input id="email" name="email" th:field="*{email}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">性别：</label>
				<div class="col-sm-8">
				   <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
	                </select>
				</div>
			</div>
			
			
			<div class="form-group">	
				<label class="col-sm-3 control-label">用户状态：</label>
				<div class="col-sm-8">
					<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_normal_disable')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">真实姓名：</label>
				<div class="col-sm-8">
					<input id="realName" name="realName" class="form-control" type="text" th:field="*{realName}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">登录密码：</label>
				<div class="col-sm-8">
					<input id="loginPasswd" name="loginPasswd" class="form-control" type="text" >
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付密码：</label>
				<div class="col-sm-8">
				   <input id="payPasswd" name="payPasswd" type="hidden">
				   <input id="payPasswd0" name="payPasswd0" class="form-control" type="text">
					
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">证件类型：</label>
				<div class="col-sm-8">
					<select name="certificateType" class="form-control m-b" th:with="type=${@dict.getType('certificate_type')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{certificateType}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">证件号码：</label>
				<div class="col-sm-8">
					<input id="certificateCode" name="certificateCode" class="form-control" type="text" th:field="*{certificateCode}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">注册时间：</label>
				<div class="col-sm-8">
				    <div class="input-group date">
                         <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input id="createTime" name="createTime" class="form-control" type="text" readonly="readonly"  th:value="${#dates.format(account.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                     </div>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">审核状态：</label>
				<div class="col-sm-8">
					<select name="checkStatus" class="form-control m-b" th:with="type=${@dict.getType('user_check_status')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{checkStatus}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">提交时间：</label>
				<div class="col-sm-8">
				     <div class="input-group date">
                         <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input id="submitDate" name="submitDate" class="form-control" type="text"  th:value="${#dates.format(account.submitDate, 'yyyy-MM-dd HH:mm:ss')}">
                     </div>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">审核时间：</label>
				<div class="col-sm-8">
				   <div class="input-group date">
				       
                         <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input id="examineDate" name="examineDate" class="form-control" type="text"   th:value="${#dates.format(account.examineDate, 'yyyy-MM-dd HH:mm:ss')}">
                     </div>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">驳回内容：</label>
				<div class="col-sm-8">
				  <textarea type="text"id="checkContent" name="checkContent" class="form-control" placeholder="请输入文本" >[[*{checkContent}]]</textarea>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">禁用理由：</label>
				<div class="col-sm-8">
				  <textarea type="text"id="checkContent" name="unuseReason" class="form-control" placeholder="请输入文本">[[*{unuseReason}]]</textarea>
				</div>
			</div>
			
			
			
		</form>
    </div>
    <div th:include="include::footer"></div>
     <script th:src="@{/ajax/libs/datapicker/bootstrap-datetimepicker.min.js}"></script>
      <script th:src="@{/js/crypto/crypto-js.js}"></script>
     <script th:src="@{/js/crypto/cipher-core.js}"></script>
     <script th:src="@{/js/crypto/aes.js}"></script>
     <script th:src="@{/js/crypto/sha256.js}"></script>
    <script type="text/javascript">

    $(document).ready(function(){
    	 $(".input-group.date").datetimepicker({
      	   format: "yyyy-mm-dd hh:ii:ss",
      	   startDate: '2019-01-01 8:00:00',//开始年份
      	   language: 'zh-CN',
      	   initialDate: new Date(),
      	   autoclose: true
      	 });
    })
		var prefix = ctx + "manager/account";
		$("#form-account-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		
		function submitHandler() {
			//支付密码SHA256
			var payPasswd0= $("#payPasswd0").val();
			var payPasswd = CryptoJS.SHA256(payPasswd0).toString();
			$("#payPasswd").val(payPasswd);
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-account-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
